/*
 * Copyright (C) 2023 xuexiangjys(xuexiangjys@163.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package com.xuexiang.templateproject.bean;

import android.os.Parcel;
import android.os.Parcelable;
//import anet.channel.strategy.dispatch.DispatchConstants;
//import com.taobao.accs.common.Constants;
import java.util.ArrayList;
import java.util.Iterator;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
//import kotlinx.android.parcel.Parcelize;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public final class TextBookEntity implements Parcelable {
    @NotNull
    public static final Parcelable.Creator<TextBookEntity> CREATOR = new Creator();
    private final int subjectId;
    @NotNull
    private final String subjectName;
    @NotNull
    private final ArrayList<TextBookVersionVoEntity> textbookVersionVoList;

    /* compiled from: VideoTextBookEntity.kt */
    @Metadata(k = 3, mv = {1, 7, 1}, xi = 48)
    /* loaded from: classes2.dex */
    public static final class Creator implements Parcelable.Creator<TextBookEntity> {
        /* JADX WARN: Can't rename method to resolve collision */
        @Override // android.os.Parcelable.Creator
        @NotNull
        public final TextBookEntity createFromParcel(@NotNull Parcel parcel) {
            Intrinsics.checkNotNullParameter(parcel, "parcel");
            int readInt = parcel.readInt();
            String readString = parcel.readString();
            int readInt2 = parcel.readInt();
            ArrayList arrayList = new ArrayList(readInt2);
            for (int i2 = 0; i2 != readInt2; i2++) {
                arrayList.add(TextBookVersionVoEntity.CREATOR.createFromParcel(parcel));
            }
            return new TextBookEntity(readInt, readString, arrayList);
        }

        /* JADX WARN: Can't rename method to resolve collision */
        @Override // android.os.Parcelable.Creator
        @NotNull
        public final TextBookEntity[] newArray(int i2) {
            return new TextBookEntity[i2];
        }
    }

    public TextBookEntity(int i2, @NotNull String subjectName, @NotNull ArrayList<TextBookVersionVoEntity> textbookVersionVoList) {
        Intrinsics.checkNotNullParameter(subjectName, "subjectName");
        Intrinsics.checkNotNullParameter(textbookVersionVoList, "textbookVersionVoList");
        this.subjectId = i2;
        this.subjectName = subjectName;
        this.textbookVersionVoList = textbookVersionVoList;
    }

    /* JADX WARN: Multi-variable type inference failed */
    public static /* synthetic */ TextBookEntity copy$default(TextBookEntity textBookEntity, int i2, String str, ArrayList arrayList, int i3, Object obj) {
        if ((i3 & 1) != 0) {
            i2 = textBookEntity.subjectId;
        }
        if ((i3 & 2) != 0) {
            str = textBookEntity.subjectName;
        }
        if ((i3 & 4) != 0) {
            arrayList = textBookEntity.textbookVersionVoList;
        }
        return textBookEntity.copy(i2, str, arrayList);
    }

    public final int component1() {
        return this.subjectId;
    }

    @NotNull
    public final String component2() {
        return this.subjectName;
    }

    @NotNull
    public final ArrayList<TextBookVersionVoEntity> component3() {
        return this.textbookVersionVoList;
    }

    @NotNull
    public final TextBookEntity copy(int i2, @NotNull String subjectName, @NotNull ArrayList<TextBookVersionVoEntity> textbookVersionVoList) {
        Intrinsics.checkNotNullParameter(subjectName, "subjectName");
        Intrinsics.checkNotNullParameter(textbookVersionVoList, "textbookVersionVoList");
        return new TextBookEntity(i2, subjectName, textbookVersionVoList);
    }

    @Override // android.os.Parcelable
    public int describeContents() {
        return 0;
    }

    public boolean equals(@Nullable Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof TextBookEntity)) {
            return false;
        }
        TextBookEntity textBookEntity = (TextBookEntity) obj;
        return this.subjectId == textBookEntity.subjectId && Intrinsics.areEqual(this.subjectName, textBookEntity.subjectName) && Intrinsics.areEqual(this.textbookVersionVoList, textBookEntity.textbookVersionVoList);
    }

    public final int getSubjectId() {
        return this.subjectId;
    }

    @NotNull
    public final String getSubjectName() {
        return this.subjectName;
    }

    @NotNull
    public final ArrayList<TextBookVersionVoEntity> getTextbookVersionVoList() {
        return this.textbookVersionVoList;
    }

    public int hashCode() {
        return (((this.subjectId * 31) + this.subjectName.hashCode()) * 31) + this.textbookVersionVoList.hashCode();
    }

    @NotNull
    public String toString() {
        return "TextBookEntity(subjectId=" + this.subjectId + ", subjectName=" + this.subjectName + ", textbookVersionVoList=" + this.textbookVersionVoList + ')';
    }

    @Override // android.os.Parcelable
    public void writeToParcel(@NotNull Parcel out, int i2) {
        Intrinsics.checkNotNullParameter(out, "out");
        out.writeInt(this.subjectId);
        out.writeString(this.subjectName);
        ArrayList<TextBookVersionVoEntity> arrayList = this.textbookVersionVoList;
        out.writeInt(arrayList.size());
        Iterator<TextBookVersionVoEntity> it = arrayList.iterator();
        while (it.hasNext()) {
            it.next().writeToParcel(out, i2);
        }
    }
}